package cn.szsys.integration.billrule.entity;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

/**
 * @author Ryan
 * @since 2025-05-07
 **/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
public class BillingInfo implements Serializable {

    /**
     * 下游响应码
     */
    private String downResponseCode;
    /**
     * 上游响应码
     */
    private String upResponseCode;
    /**
     * 上游响应时间
     */
    private Long upResponseTime;

    /**
     * 上游响应时间
     */
    private Long downResponseTime;


    public static BillingInfo build(String downResponseCode
            , String upResponseCode
            , Long upResponseTime) {
        return BillingInfo.builder()
                .downResponseCode(downResponseCode)
                .upResponseCode(upResponseCode)
                .upResponseTime(upResponseTime)
                .build();
    }

}
